package com.sunnuwell.demo.service;

import com.sunnuwell.demo.common.exception.AdException;
import com.sunnuwell.demo.entity.Role;
import com.sunnuwell.demo.entity.User;
import com.sunnuwell.demo.entity.UserToken;
import com.sunnuwell.demo.vo.UserRquest;
import org.springframework.data.domain.Page;

import java.util.List;

public interface UserService {
    User findByUsername(UserRquest user) throws AdException;

    User findUserById(String userId);

    void saveToken(UserToken userToken);

    UserToken findTokenByUid(String uid);

    void save(UserRquest user) throws AdException;

    Page<User> findAll(UserRquest userRequest) throws AdException;

    void update(UserRquest userRequest) throws AdException;

    void deleteUser(UserRquest userRequest);

    User checkUserToken(String token) throws AdException;

    List<Role> findAllRoles();

    List<User> findAllUser();
}
